﻿using System;

namespace Centido.Management.ConsoleManager
{
    /// <summary>
    ///   An abstract console command.
    /// </summary>
    internal abstract class Command
    {
        /// <summary>
        ///   Gets the console command name.
        /// </summary>
        public abstract string Name { get; }


        /// <summary>
        ///   Gets the console command description.
        /// </summary>
        public abstract string Description { get; }


        /// <summary>
        ///   Gets the console command full description.
        /// </summary>
        public abstract string FullDescription { get; }


        /// <summary>
        ///   Executes the console command.
        /// </summary>
        /// <param name="context">The console command execution context.</param>
        /// <exception cref="ArgumentNullException">Thrown when the value of <paramref name="context"/> is null.</exception>
        public virtual void Execute(CommandExecutionContext context)
        {
            if (context == null)
                throw new ArgumentNullException("context");
        }
    }
}
